package com.droowa.model.service;

import java.sql.SQLException;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;








import com.droowa.domain.BusinessRecord;
import com.droowa.domain.CancelManagement;
import com.droowa.model.dao.CancelManagementDAO;
import com.droowa.util.BusinessRecordPagingBean;

@Service
public class CancelManagementServiceImpl implements CancelManagementService{
	
	@Autowired
	private CancelManagementDAO dao;
	

	@Override
	public int joinCancelManagement(CancelManagement cancelManagement) throws SQLException {
		return dao.insertCancelManagement(cancelManagement);
	}

	@Override
	public int removeCancelManagement(String orderNumber) throws SQLException {
		return dao.deleteCancelManagement(orderNumber);
	}

	@Override
	public int modifyCancelManagement(CancelManagement cancelManagement) throws SQLException {
		return dao.updateCancelManagement(cancelManagement);
	}



	@Override
	public List getCancelManagementByAll(HashMap map) throws SQLException {
		List<CancelManagement> list = dao.selectCancelManagementByAll(map);
//		BusinessRecordPagingBean pb = new BusinessRecordPagingBean(dao.selectRowCount(map), (int)map.get("page"));
//		HashMap resultMap = new HashMap();
//		resultMap.put("cancelManagement_list", list);
//		resultMap.put("paging", pb);
		return list;
	}
	

}
